<div ng-include="'tpl/base/web/header.html'"></div>
<div ng-include="'tpl/base/web/search.html'"></div>

<div id="leftTab4" class="clearfix">
    <div ng-include="'tpl/base/web/leftTab.html'"></div>
    <div class="interface fl clearfix">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a  onclick="return false;" href="#home" aria-controls="home" role="tab" data-toggle="tab">库存管理</a></li>
            <li role="presentation"><a  onclick="return false;" href="#tab2" aria-controls="tab2" role="tab" data-toggle="tab">出货报表</a></li>

        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <!--库存管理-->
            <div ng-controller="leftTab4"  role="tabpanel" class="tab-pane active" id="home">
                <div class="merchantSearch">
                    <ul>
                        <li class="box-between">
                            <label>
                                <span>商户名称：</span>
                                <select name="storeName" ng-options="v.storeName as v.storeName for v in storeAll" ng-model="storeAllCode">
                                    <option value="">全部</option>
                                </select>
                            </label>

                            <label>
                                <span>数量范围：</span>
                                <input type="text" ng-model="searchMsg.minQty">

                                <span style="text-align: center;min-width:40px;">-</span>
                                <input type="text" ng-model="searchMsg.maxQty">

                            </label>

                        </li>

                        <li class="box-between">
                            <label>
                                <span>耗材品牌：</span>
                                <select style="box-sizing: border-box;height:30px;text-indent: 10px;"
                                        name="searchSelect4" ng-options="v.code as v.code for v in meterialBrand"
                                        ng-model="meterialBrandCode" ng-change="meterialBrandChange();">
                                    <option value="">全部</option>
                                </select>
                            </label>



                            <label>
                                <span>耗材分类：</span>
                                <select style="box-sizing: border-box;height:30px;text-indent: 10px;"
                                        name="searchSelect5" ng-options="v.code as v.code for v in meterialClassify"
                                        ng-model="meterialClassifyCode">
                                    <option value="">全部</option>
                                </select>
                            </label>

                            <label>
                                <span>耗材名称：</span>
                                <input type="text" ng-model="searchMsg.itemCode">
                            </label>
                        </li>

                        <li>
                            <button class="searchBtn" ng-click="searcBtnClick();">搜索</button>
                        </li>
                    </ul>
                </div>

                <div class="merchantList">

                    <ul>
                        <li ng-click="excelClick();" class="excel"><img src="img/icon/excel.png" alt=""></li>
                    </ul>
                    <table style="table-layout: fixed">
                        <tr class="th">
                            <td>商户名称</td>
                            <td>耗材品牌</td>
                            <td>耗材分类</td>
                            <td>耗材名称</td>
                            <td class="th">库存</td>
                            <td class="th">操作</td>
                        </tr>

                        <tr ng-repeat="item in tableData" on-finish-render-filters>
                            <td>{{item.storeName}}</td>
                            <td>{{item.itemBrandCode}}</td>
                            <td>{{item.itemCategoryCode}}</td>
                            <td>{{item.itemCode}}</td>
                            <td ng-class="{true:'tdShow',false:'tdHide'}[item.flag == 0]">{{item.onHandQty}}</td>
                            <td ng-class="{true:'tdShow',false:'tdHide'}[item.flag == 1]"><span class="subQty" ng-click="subQty();">-</span><span class="Qtynum">{{item.onHandQty}}</span><span class="addQty" ng-click="addQty();">+</span></td>
                            <td ng-class="{true:'tdShow',false:'tdHide'}[item.flag == 0]" ng-click="changeBtnClick();" style="color:blue;text-decoration: underline">修改库存</td>
                            <td ng-class="{true:'tdShow',false:'tdHide'}[item.flag == 1]" ng-click="saveBtnClick();" style="color:blue;text-decoration: underline"><span ng-click="saveBtn();">保存</span></td>
                        </tr>


                    </table>
                </div>

                <div class="paging" >
                    <div class="clearfix box-between">
                        <!--<div class="branches fl">-->
                        <!--<select name="" id="">-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">4</option>-->
                        <!--</select>-->
                        <!--<span>条 / 页</span>-->
                        <!--</div>-->

                        <div class="page fl">
                            <span class="fl pageTurn prev" ng-click="firstPageBtn();">首页</span>
                            <span class="fl pageTurn prev" ng-click="prevPageBtn();">上一页</span>
                            <!--<ul class="fl">-->
                            <!--<li>1</li>-->
                            <!--<li>2</li>-->
                            <!--<li>3</li>-->
                            <!--<li>4</li>-->
                            <!--<li>5</li>-->
                            <!--<li>6</li>-->
                            <!--<li>7</li>-->
                            <!--<li>8</li>-->

                            <!--</ul>-->
                            <div class="pageTo fl">
                                <p>转到 <input type="text" ng-model="page1" ng-keyup="myKeyup13($event)"> 页</p>
                            </div>
                            <span class="fl pageTurn next" ng-click="nextPageBtn();">下一页</span>
                            <span class="fl pageTurn next toLast" ng-click="lastPageBtn();">尾页</span>
                            <p class="fl">共 <span>{{pageMsg.totalPages}}</span> 页  /  <span>{{pageMsg.totalElements}}</span> 条数据</p>
                        </div>
                    </div>


                </div>

            </div>

            <!--出货报表-->
            <div ng-controller="leftTab4_1" role="tabpanel" class="tab-pane" id="tab2">
                <div class="merchantSearch">
                    <ul>
                        <li class="box-between datePicker">

                            <span>下单时间：</span>
                            <!--<select name="proName" ng-options="v.provinceid as v.province for v in provinces" ng-model="provinceId" ng-change="getCity();">-->
                            <!--&lt;!&ndash;<option value="">全部</option>&ndash;&gt;-->
                            <!--</select>-->

                            <!--<span style="text-align: center;min-width:40px;">-</span>-->
                            <!--<select name="proName" ng-options="v.storeName as v.storeName for v in ppp" ng-model="storeName" ng-change="getCity();">-->
                            <!--&lt;!&ndash;<option value="">全部</option>&ndash;&gt;-->
                            <!--</select>-->


                            <!--下单时间控件-->
                            <div class="container">
                                <form action="" class="form-horizontal">
                                    <fieldset>
                                        <div class="control-group">
                                            <div class="controls input-append date form_date" data-date=""
                                                 data-date-format="yyyy-mm-dd" data-link-field="dtp_input1"
                                                 data-link-format="yyyy/mm/dd">
                                                <input class="containerInput" size="16" type="text" value="" readonly>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-remove"></i></span>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-th"></i></span>
                                            </div>
                                            <input type="hidden" id="dtp_input1"  class="dtpInput1"  value="" ng-model="StartTime"/><br/>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                            <span style="min-width:30px;text-align: center;height:30px;">-</span>
                            <div class="container">
                                <form action="" class="form-horizontal">
                                    <fieldset>
                                        <div class="control-group">
                                            <div class="controls input-append date form_date" data-date=""
                                                 data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
                                                 data-link-format="yyyy/mm/dd">
                                                <input class="containerInput" size="16" type="text" value="" readonly>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-remove"></i></span>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-th"></i></span>
                                            </div>
                                            <input type="hidden" id="dtp_input2" class="dtpInput2"  value="" ng-model="EndTime"/><br/>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                            <!--时间控件  end-->


                            <label style="width:40%;">
                                <span>商户名称：</span>
                                <select style="width:230px;" name="storeName2" ng-options="v.storeName as v.storeName for v in storeAll"
                                        ng-model="storeAllCode">
                                    <!--<option value="">全部</option>-->
                                </select>
                            </label>


                        </li>

                        <li>
                            <button class="searchBtn" ng-click="searcBtnClick();">搜索</button>
                        </li>
                    </ul>
                </div>

                <div class="merchantList">

                    <table>
                        <tr class="th">
                            <td>门店</td>
                            <td>耗材品牌</td>
                            <td>耗材名称</td>
                            <td>耗材分类</td>

                            <td>使用数量</td>
                            <!--<td>下单时间</td>-->
                        </tr>

                        <tr ng-repeat="item in tableData" on-finish-render-filters>
                            <td>{{item.storeName}}</td>
                            <td>{{item.itemBrandCode}}</td>
                            <td>{{item.itemCode}}</td>
                            <td>{{item.itemCategoryCode}}</td>

                            <td>{{item.usenum}}</td>
                            <!--<td>{{item.createDate}}</td>-->
                        </tr>


                    </table>
                </div>

                <div class="paging" >
                    <div class="clearfix box-between">
                        <!--<div class="branches fl">-->
                        <!--<select name="" id="">-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">4</option>-->
                        <!--</select>-->
                        <!--<span>条 / 页</span>-->
                        <!--</div>-->

                        <div class="page fl">
                            <span class="fl pageTurn prev" ng-click="firstPageBtn();">首页</span>
                            <span class="fl pageTurn prev" ng-click="prevPageBtn();">上一页</span>
                            <!--<ul class="fl">-->
                            <!--<li>1</li>-->
                            <!--<li>2</li>-->
                            <!--<li>3</li>-->
                            <!--<li>4</li>-->
                            <!--<li>5</li>-->
                            <!--<li>6</li>-->
                            <!--<li>7</li>-->
                            <!--<li>8</li>-->

                            <!--</ul>-->
                            <div class="pageTo fl">
                                <p>转到 <input type="text" ng-model="page1" ng-keyup="myKeyup13($event)"> 页</p>
                            </div>
                            <span class="fl pageTurn next" ng-click="nextPageBtn();">下一页</span>
                            <span class="fl pageTurn next toLast" ng-click="lastPageBtn();">尾页</span>
                            <p class="fl">共 <span>{{pageMsg.totalPages}}</span> 页  /  <span>{{pageMsg.totalElements}}</span> 条数据</p>
                        </div>
                    </div>


                </div>
            </div>


        </div>

    </div>

</div>
<div ng-include="'tpl/base/web/bottom.html'"></div>